export default function (data) {
    // data = JSON.parse(data);
    let loginPath = data.loginPath ? data.loginPath : '';
    let style = `
                <style>
                  .centerLogin{
                    width: 60%;
                    height: 50%;
                    position: fixed;
                    margin: auto;
                    top: 0;
                    left: 0;
                    bottom: 0;
                    right: 0;
                  }
                  .centerLogin h1{
                    text-align: center;
                  }
                </style>
                `
    let html = `
                <div class="centerLogin jumbotron" style="background: white">
                    <h1>后台管理</h1>
                     <div class="form-group">
                        <label>账户名</label>
                        <input type="email" class="form-control" id="exampleInputEmail1" placeholder="Username">
                      </div>
                      <div class="form-group">
                        <label for="exampleInputPassword1">密码</label>
                        <input type="password" class="form-control" id="exampleInputPassword1" placeholder="Password">
                      </div>
                      <button type="button" class="btn btn-primary loginBtn" style="width: 100%;margin-top: 20px">登录</button>
                </div>
                `;
    window.nbasics.differAction(() => {
        document.querySelector(".loginBtn").onclick = function () {
            let dataObjCollector = {};
            window.nbasics.touchBack({"path": loginPath, data: JSON.stringify(dataObjCollector)})
        }
    });
    return (`<div>${style}${html}</div>`);
}